import type {ResponseData,} from "../../common/type";


export interface ColConfig {
    "addFlag": boolean,
    "colName": string,
    "updateFlag": boolean,
    "request": boolean,
    "voFlag": boolean
}

export interface TableSearchAddForm {
    "colName": string,
    "searchType": number
}

export interface TableConfigAddOrUpdateForm {
    "author": string,
    "basePack": string,
    "dataSourceUuid": string,
    "fieldPrefixes": string,
    "productLocalPath": string,
    "productName": string,
    "menuName": string,
    "parentMenuUuid": string,
    "tableName": string,
    "tablePrefixes": string,
    colConfigList: ColConfig[],
    tableSearchAddFormList: TableSearchAddForm[],
    delCol?: string,
    "delType": string,
    "tableUuid": string,
    "updateExAdd": string
}

//定义获取日志分页列表
export interface TableConfigListResponseData extends ResponseData {
    result: {
        data: TableConfigInfoList,
        page: number,
        items: number,
        pageSize: number,
        currentPage: number,
        pageCount: number
    }
}

export interface TableConfigInfoList {
    tableConfigInfoList: TableConfigInfo[]
}

export interface TableConfigInfo {
    "uuid": string,
    "tableName": string,
    "tableUuid": string,
    "dataSourceUuid": string,
    "delType": string,
    "delCol": string,
    "updateExAdd": string,
    "author": string,
    "tablePrefixes": string,
    "dataSourceName": string,
    "databaseName": string,
    "sort": number,
    "tableComment": string,
    "productLocalPath": string,
    "productName": string,
    "basePack": string,
    "menuName": string,
    "parentMenuUuid": string,
    "config": string,
    "createTime": string,
    "updateTime": string
}

export interface ColConfigVO {
    "uuid": string,
    "dataSourceUuid": string,
    "tableUuid": string,
    "tableName": string,
    "columnName": string,
    "dataType": string,
    "javaDataType": string,
    "columnComment": string,
    "tfColName": string,
    "addFlag": boolean,
    "updateFlag": boolean,
    "voFlag": boolean,
    "request": boolean,
    "sort": number
}

export interface TableSearchVO {
    "uuid": string,
    "tableUuid": string,
    "colUuid": string,
    "colName": string,
    "tfColName": string,
    "colComment": string,
    "javaDataType": string,
    "searchTypeStr": string,
    "searchType": number
}

//获取当前登录用户对象
export interface TableConfigResponseData extends ResponseData {
    result: {
        "uuid": string,
        "tableName": string,
        "tableUuid": string,
        "dataSourceUuid": string,
        colConfigVOList: ColConfigVO[],
        tableSearchVOList: TableSearchVO[],
        "delType": string,
        "delCol": string,
        "updateExAdd": string,
        "author": string,
        "tablePrefixes": string,
        "dataSourceName": string,
        "databaseName": string,
        "sort": number,
        "tableComment": string,
        "productLocalPath": string,
        "productName": string,
        "basePack": string,
        "menuName": string,
        "parentMenuUuid": string,
        "config": string,
        "createTime": string,
        "updateTime": string
    }
}

export interface ColInfo{
    "uuid": string,
    "dataSourceUuid": string,
    "tableUuid": string,
    "tableName": string,
    "columnName": string
}

export interface AllColListResponseData extends ResponseData {
    result: {
        colList:ColInfo[]
    }
}
